package d;

import java.util.Date;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.JSONSerializerMap;
import com.alibaba.fastjson.serializer.SimpleDateFormatSerializer;

public class Json {
	private static JSONSerializerMap mapping = new JSONSerializerMap();
    static {
        mapping.put(Date.class, new SimpleDateFormatSerializer("yyyy-MM-dd hh:mm:ss"));
    }

	public static String toJsonString(Object obj){
		return JSON.toJSONString(obj,mapping);
	}
}
